/*
 * Copyright (c) 2002-2004, xRhino, Inc.
 *
 * This library is free software; you can redistribute and/or modify
 * it under the terms of the dual license distributed with this source
 * package (a combined Trolltech QPL/GPL-compatible license)
 *
 * Under this dual license scheme, a separate license is available for use of 
 * this code with a proprietary (closed) system. For more information on the 
 * license, please see the LICENSE file distributed with this source package.
 */
#include "SugPolylineElement.h"

vector<SugPoint*>* SugPolylineElement::getPointList()
{
   //return internal vector list
   return &mPoints;
}

vector<SugPoint*>* SugPolylineElement::setPointList(vector<SugPoint*> newPointList)
{
   //DEEP COPY (don't think sexual thoughts)... return pointer

   //Clean up the old vector, using erase will call the element destructors
   //mPoints.erase(mPoints.begin(), mPoints.end());
   //Resize it to our new size
   //mPoints.resize(newPointList.size());

   //Call the STL copy command, doing so calls the copy constructor for the elements
   //copy(newPointList.begin(), newPointList.end(), mPoints.begin());
   
   mPoints = newPointList;
   return &mPoints;
}

SugPolylineElement::SugPolylineElement()
{
   setElementType(SugTypes::E_POLYLINE);
}

SugPolylineElement::~SugPolylineElement()
{
}

